//this script base on jquery

$(document).ready(function(){

	(function(){
		//对AJAX查询使用提示框,显示进程信息
		$.blockUI.defaults.pageMessage ="<h2>命令执行中...</h2>";
		$.blockUI.defaults.elementMessage="<h3 style='font-weight:600;font-size:14px;' ><img src='images/ajax-loader.gif'>&nbsp;处理中<span style='font-size:18px;'>...</span></h3>";
		$.blockUI.defaults.overlayCSS ={ backgroundColor: '#FFF', opacity: '0' };
		$.blockUI.defaults.pageMessageCSS={width:'120px', margin:'30px 0 0 -125px', paddingLeft:'10px', top:'30%', left:'55%', textAlign:'center',
			 color:'#FFFFFF', backgroundColor:'#A700CC', border:'0px solid #3EE11B'};
		$.blockUI.defaults.elementMessageCSS={ width:'90px', padding:'0px', textAlign:'center',top:'200px',left:'42%',zoom:'1.1',
			 color:'#FF610E', border:'1px dashed #FF610E',backgroundColor:'transparent'};
		$.blockUI.defaults.elementMessageCSS={ width:'120px', padding:'10px', textAlign:'center',marginLeft:'32px',
			 color:'#FFFFFF', backgroundColor:'#A700CC', border:'0px solid #3EE11B'};
			 
		$().ajaxStart(function(){$("#ajaxRegion").block();}).ajaxStop(function(){$("#ajaxRegion").unblock();});	
	}).call();
		
//	if($.browser.msie&&CollectGarbage){
//		setInterval("CollectGarbage();", 6000);
//	}
//	try {
//		  document.execCommand("BackgroundImageCache", false, true);
//	} catch(err) {}

});


//ajax获取页面
function fetchAjaxPage(updateRegion,url,params){
	var r=$(updateRegion);
	$.get(
		url,
		params,
		function (data){
			r.html(data);
		}
	);
}